﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tx;

namespace OccExample.Commands
{
    public class DocOpenedCmdEnableAttribute : CmdEnableAttribute
    {
        public override bool Enable(ExtendCmdData cmdData, ref string message)
        {
            var mainWindow = cmdData.MainWindow as MainWindow;
            if (!mainWindow.IsDocumentOpen) return false;
            return base.Enable(cmdData, ref message);
        }
    }
}
